package com.yiyuan.app.service;

import com.guaike.core.entity.result.Result;
import com.yiyuan.app.entity.param.*;
import com.yiyuan.app.entity.result.*;

import java.io.IOException;
import java.util.List;

public interface PlayService {
    /**
     * 潮玩房间列表
     *
     * @param param
     * @return
     */
    Result<List<BaseRoomVO>> roomList(RoomListDTO param);

    /**
     * 进入房间
     *
     * @param roomId
     * @return
     */
    Result<RoomVO> intoRoom(Long roomId) throws IOException;

    /**
     * 开始游戏
     *
     * @param param
     * @return
     */
    Result<Boolean> startGame(StartGameDTO param);

    /**
     * 校验自己是否可以游戏
     *
     * @param roomId
     * @param positionNo
     * @return
     */
    Result<Boolean> checkCanPlay(Long roomId, String positionNo);

    /**
     * 结算退出游戏
     *
     * @param param
     * @return
     */
    Result<Boolean> exitGame(ExitGameDTO param) throws Exception;

    /**
     * 退出推币机畅玩游戏开启新游戏
     * @param param
     * @return
     */
    Result<Boolean> exitOccupyGame(ExitGameDTO param);

    /**
     * 开始挑战
     *
     * @param param
     * @return
     */
    Result<Boolean> startBattle(StartBattleDTO param);

    /**
     * 校验是否可投币
     * @param roomId
     * @return
     */
    Result<Boolean> checkPushCoins(Long roomId,Integer count);

    /**
     * 游戏中获取松果数量
     * @param roomId
     * @return
     */
    Result<PlayPineDataVO> findPlayPinecone(Long roomId);

    /**
     * 报修房间
     *
     * @param param
     * @return
     */
    Result<Boolean> reportRepair(BaseRoomIdDTO param) throws IOException;

    /**
     * 获取挂机信息
     *
     * @param roomId
     * @return
     */
    Result<AutoVO> findAutoInfo(Long roomId);

    /**
     * 获取赏金配置
     *
     * @param roomId
     * @return
     */
    Result<List<PrizeConfigVO>> findPrizeConfig(Long roomId);

    /**
     * 推币机提交赏金
     *
     * @param param
     * @return
     */
    Result<Boolean> submitPrize(SubmitPrizeDTO param) throws IOException;

    /**
     * 获取潮玩奖励配置
     *
     * @return
     */
    Result<List<CwPrizeConfigVO>> findCwPrizeConfig();

    /**
     * 获取潮玩记录
     *
     * @return
     */
    Result<List<PrizeRecordVO>> findCwRecord();

    /**
     * 获取我的潮玩记录
     *
     * @return
     */
    Result<List<BasePrizeRecordVO>> findMyCwRecord();

    /**
     * 获取围观人数
     *
     * @param roomId
     * @return
     */
    Result<Long> getLookPersonCount(Long roomId);

    /**
     * 获取推币机本场累计获得松子数
     *
     * @param roomId
     * @return
     */
    Result<Long> getTotalPineNut(Long roomId);

    /**
     * 获取推币机本场累计获得松子数
     *
     * @param roomId
     * @return
     */
    Result<PlayGetDataVO> getTotalPineNutNew(Long roomId);
}
